﻿// TestFor_AuthOther.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//

#include "pch.h"
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
using namespace std;
#include "../../../../NetEngine_Windows/NetEngine_SourceCode/XyRyNet_CommHdr.h"
#include "../../../../NetEngine_Windows/NetEngine_SourceCode/NetEngine_Lib/NetEngine_BaseLib/BaseLib_Define.h"
#include "../../../../NetEngine_Windows/NetEngine_SourceCode/NetEngine_AuthorizeReg/NetEngine_AuthGenerateSerial/AuthGenerateSerial_Define.h"
#include "../../../../NetEngine_Windows/NetEngine_SourceCode/NetEngine_AuthorizeReg/NetEngine_AuthGenerateSerial/AuthGenerateSerial_Error.h"

#pragma comment(lib,"../../../../NetEngine_Windows/NetEngine_SourceCode/Debug/NetEngine_AuthGenerateSerial.lib")

int main()
{
	NETENGINE_LIBTIMER st_LibTimer;
	st_LibTimer.wMinute = 1123;
	if (!NetEngine_AuthGenerateSerial_Start("XAUTH", 5, 10, ENUM_NETENGINE_AUTHREG_GENERATESERIAL_TYPE_MINUTE, &st_LibTimer))
	{
		printf("error\n");
		return -1;
	}
	while (1)
	{
		TCHAR tszSerial[1024];
		memset(tszSerial, '\0', sizeof(tszSerial));
		if (!NetEngine_AuthGenerateSerial_Get(tszSerial))
		{
			break;
		}
		ENUM_AUTHREG_GENERATESERIALTYPE enSerialType;
		NetEngine_AuthGenerateSerial_GetType(tszSerial, &enSerialType, &st_LibTimer);
		printf("%s:Minute:%d\n", tszSerial, st_LibTimer.wMinute);
	}
	return 0;
}

